package com.yxw.mapper;

import com.yxw.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;
import java.util.Objects;

public interface UserMapper {
//    @Select("select * from t_users;")
    List<User> selectAll();
//    @Select("select * from t_users where id = #{aaaa}")
    User selectById(Integer id);
    User selectByIdAndName(@Param("id") Integer id,@Param("name") String name);
    User selectByIdAndNameUseMap(Map<String, Object> map);
    User selectByIdAndSexUsePojo(User user);

    List<User> selectAllByLike(String name);
    int deleteById(Integer id);
    int insert(User user);
    int update(User user);
}
